import java.util.Scanner;

public class A1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int f;
        f = in.nextInt();
        System.out.println((int)((f-32)*5/9));
        System.out.println(f=f+1);
    }
}
